package com.yidu.hbats.service.impl.AtsBase;

import com.github.pagehelper.PageHelper;
import com.yidu.hbats.dao.AtsDataDicMapper;
import com.yidu.hbats.model.AtsBaseSport;
import com.yidu.hbats.model.AtsDataDic;
import com.yidu.hbats.service.atsBase.AtsDataDicService;
import com.yidu.springbootdemo.permission.tools.Pages;
import com.yidu.utils.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @program: spring-boot-demo
 * @description: ${description}
 * @author: clg
 * @create: 2019-10-31 08:45
 */

@Service
public class AtsDataDicServiceImpl implements AtsDataDicService {

    @Resource
    public AtsDataDicMapper atsDataDicMapper;


    @Override
    public List<AtsDataDic> selectAll(AtsDataDic atsDataDic, Page page) {
        PageHelper.offsetPage(page.getStart(), page.getRows());
        List<AtsDataDic> list=atsDataDicMapper.selectAll(atsDataDic);
        PageHelper.startPage(page.getStart(), page.getRows());
        return list;
    }

    @Override
    public int saveOrUpdate(AtsDataDic atsDataDic) {
        return atsDataDicMapper.saveOrUpdate(atsDataDic);
    }

    @Override
    public AtsDataDic selectByPrimaryKey(Integer did) {
        return atsDataDicMapper.selectByPrimaryKey(did);
    }

    @Override
    public int deleteByPrimaryKey(Integer did) {

        return atsDataDicMapper.deleteByPrimaryKey(did);
    }

    @Override
    public int insert(AtsDataDic atsDataDic) {
        return atsDataDicMapper.insert(atsDataDic);
    }

    @Override
    public int updateByPrimaryKeySelective(AtsDataDic atsDataDic) {
        return atsDataDicMapper.updateByPrimaryKeySelective(atsDataDic);
    }

    @Override
    public int selectCount(AtsDataDic atsDataDic){
        return atsDataDicMapper.selectCount(atsDataDic);
    }

    @Override
    public int delecteAll(Integer ids) {

        return atsDataDicMapper.deleteAll(ids);
    }


    @Override
    public int updateIsva(AtsDataDic atsDataDic) {
        return atsDataDicMapper.updateIsva(atsDataDic);
    }

    @Override
    public List<AtsDataDic> findAll(AtsDataDic atsDataDic) {
        return atsDataDicMapper.findAll(atsDataDic);
    }
}





